#ifndef CVPROCESSOR_H
#define CVPROCESSOR_H
#include "identifiimg.h"
#include "identtrackerorb.h"
#include "identtrackertemplate.h"
#include "imagerecord.h"
#include "CVAlgorithmFactory.h"
#include "ImageProcessor.h"

#include <opencv2/imgproc.hpp>
#include <QObject>
#include <opencv2/core.hpp>
#include <QRect>


class CvProcessor : public QObject
{
    Q_OBJECT

public:
    static  CvProcessor &getInstance();
    void initialize();
    void processImg(ImageRecord &imgcard );
    void loadAlgorithms(ImageProcessor *imgProcessor);

public slots:
    void configDataChanged(const QString& category, const QString& key);

private:
    CvProcessor(QObject *parent = nullptr);
    CvProcessor& operator=(const CvProcessor& rhs) = delete;

    //std::vector<std::unique_ptr<CVAlgorithm>> algorithms;

    void clearAlgorithms(ImageProcessor *imgProcessor);
    const std::string section="cvInspection";

};

#endif // CVPROCESSOR_H
